﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp1
{
    class Enum
    {
        public enum Indent : int
        {
            新订单,
            已发货,
            已签收,
            已评价
        }
        public  void Writeenum() 
        {

            Console.WriteLine("订单状态" + Indent.新订单 + "值为" + (int)Indent.新订单);
            Console.WriteLine("订单状态为" + Indent.已发货 + "值为" + (int)Indent.已发货);
            Console.WriteLine("订单状态" + Indent.已签收 + "值为" + (int)Indent.已签收);
            Console.WriteLine("订单状态" + Indent.已评价 + "值为" + (int)Indent.已评价);


            

        }
        public enum Fruit
        {
            香蕉 =4,
            苹果 =3,
            西瓜 =10,
            草莓 =2,
            葡萄 =1,
            哈密瓜 =7,
            奇异果 =6
        }
        public void CutFruit() 
        {
            Console.WriteLine("请输入切的水果：");
            string a = Console.ReadLine();
            Fruit fruit = (Fruit)Fruit.Parse(typeof(Fruit), a);
            Score(fruit);

        }
        public void Score(Fruit fruit) 
        {
            switch (fruit)
            {
                case Fruit.香蕉:
                    Console.WriteLine("获得{0}分",(int)Fruit.香蕉);
                    break;
                case Fruit.苹果:
                    Console.WriteLine("获得{0}分", (int)Fruit.苹果);
                    break;
                case Fruit.西瓜:
                    Console.WriteLine("获得{0}分", (int)Fruit.西瓜);
                    break;
                case Fruit.草莓:
                    Console.WriteLine("获得{0}分", (int)Fruit.草莓);
                    break;
                case Fruit.葡萄:
                    Console.WriteLine("获得{0}分", (int)Fruit.葡萄);
                    break;
                case Fruit.哈密瓜:
                    Console.WriteLine("获得{0}分", (int)Fruit.哈密瓜);
                    break;
                case Fruit.奇异果:
                    Console.WriteLine("获得{0}分", (int)Fruit.奇异果);
                    break;
                default:
                    break;
            }
        }

        public enum Zhiye 
        {
            战士,
            法师,
            精灵
        }
        public void jineng (Zhiye zhiye)
        {
            
            switch (zhiye)
            {
                case Zhiye.战士:
                    Console.WriteLine("战士的技能：碎石打击、烈焰锚钩、战斗咆哮");
                    break;
                case Zhiye.法师:
                    Console.WriteLine("法师的技能：巨浪冲击、元素突击、复仇杀戮");
                    break;
                case Zhiye.精灵:
                    Console.WriteLine("精灵的技能：减速陷阱、能量浪潮、旋风剑舞");
                    break;
                default:
                    break;
            }

        }
        public void WriteJineng() 
        {
            Console.WriteLine("请输入职业");
            string str = Console.ReadLine();
            Zhiye zhiye = (Zhiye)Zhiye.Parse(typeof(Zhiye), str);
            jineng(zhiye);
        }




    }
}
